package cz.muni.fi.pa165.travelagency.api.services;

import cz.muni.fi.pa165.travelagency.api.entities.ICustomer;
import java.util.List;

/**
 *
 * @author Jan Novotný
 */
public interface ICustomerService {
    
    /**
     * Creates new <code>ICustomer</code>
     * @param customer <code>ICustomer</code> to be created
     */
    public void createCustomer(ICustomer customer);

    /**
     * Removes <code>ICustomer</code>
     * @param customer <code>ICustomer</code> for removal
     */
    public void deleteCustomer(ICustomer customer);

    /**
     * Retrieves all <code>ICustomer</code>s
     * @return list of all <code>ICustomer</code>s
     */
    public List<ICustomer> findAll();

    /**
     * Retrieves <code>ICustomer</code>s with searched name
     * @param name of <code>ICustomer</code>
     * @return list of found <code>ICustomer</code>s
     */
    public List<ICustomer> findByName(String name);

    /**
     * Retrieves <code>ICustomer</code> by id
     * @param id id of <code>ICustomer</code>
     * @return found <code>ICustomer</code>
     */
    public ICustomer getCustomer(Long id);

    /**
     * Updates <code>ICustomer</code> data
     * @param customer <code>ICustomer</code> for update
     */
    public void updateCustomer(ICustomer customer);
}
